# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-voluptuous
_pkgname=voluptuous
pkgver=0.11.7
pkgrel=1
pkgdesc="A Python data validation library"
url="https://github.com/alecthomas/voluptuous"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-nose"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-voluptuous" # Backwards compatibility
provides="py-voluptuous=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare
	# https://github.com/alecthomas/voluptuous/issues/333
	rm -rf *.egg-info
}

build() {
	python3 setup.py build
}

check() {
	nosetests -v
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="bf0ad4684a4da59b3eccb54f6edfa643eb894076fc50d1bfd4c953de15cfd711a70e8aee685497197eaef24897ae55fb5fb2aec5e2fc9dcf344a6f7c6f569b88  voluptuous-0.11.7.tar.gz"
